home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / tclx7_31.z / tclx7_31 / tcldev / tclX7.3a-p1 / tksrc / Makefile.in next >
Encoding:
Makefile  |  1993-12-02  |  4.7 KB  |  148 lines

  1. #
  2. # tksrc/Makefile.in --
  3. #
  4. # Makefile to build a wish with Extended Tcl (wishx).
  5. #------------------------------------------------------------------------------
  6. # Copyright 1992-1993 Karl Lehenbauer and Mark Diekhans.
  7. #
  8. # Permission to use, copy, modify, and distribute this software and its
  9. # documentation for any purpose and without fee is hereby granted, provided
  10. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  11. # Mark Diekhans make no representations about the suitability of this
  12. # software for any purpose.  It is provided "as is" without express or
  13. # implied warranty.
  14. #------------------------------------------------------------------------------
  15. # $Id: Makefile.in,v 3.2 1993/12/02 03:56:12 markd Exp $
  16. #------------------------------------------------------------------------------
  17. #
  18. SHELL = /bin/sh
  19.  
  20. #------------------------------------------------------------------------------
  21. # Autoconfig defines that can be overridden in Config.mk
  22.  
  23. CC          = @CC@
  24. RANLIB      = @RANLIB@
  25. MCS         = @MCS_CMD@
  26. srcdir      = @srcdir@
  27. srcbasedir  = @srcbasedir@
  28. bldbasedir  = @bldbasedir@
  29. VPATH       = @srcdir@
  30. prefix      = /usr/local
  31. exec_prefix = /usr/local
  32. ARCH        = @TCL_ARCH@
  33. XINCLUDES   = @XINCLUDES@
  34. LIBS        = @LIBS@
  35. XLIBSW      = @XLIBSW@
  36.  
  37. #------------------------------------------------------------------------------
  38. # Include user-editable defines.
  39.  
  40. @MAKEINCLUDE@ @MAKEQUOTE@${bldbasedir}/Config.mk@MAKEQUOTE@
  41.  
  42. #------------------------------------------------------------------------------
  43.  
  44. LIBTK.A      = ${bldbasedir}/tkmaster/lib${ARCH}/libtk.a
  45. LIBTKX.A     = ${bldbasedir}/tkmaster/lib${ARCH}/libtkx.a
  46. WISHX        = ${bldbasedir}/tkmaster/bin${ARCH}/wishx
  47. APPINIT      = ${bldbasedir}/tkmaster/src/tkXAppInit.c
  48. SYSLIBS      = ${bldbasedir}/tkmaster/src/SYSLIBS${ARCH}
  49. TKXMAINPP.O  = ${bldbasedir}/tkmaster/lib${ARCH}/tkXmain++.o
  50.  
  51. LIBTCL.A  = ${bldbasedir}/tclmaster/lib${ARCH}/libtcl.a
  52. LIBTCLX.A = ${bldbasedir}/tclmaster/lib${ARCH}/libtclx.a
  53.  
  54. # The ordering of the libraries is important.  Some X libs on SysV include
  55. # "random" in a BSD module.  This would conflict with the one in the Tcl
  56. # library if it was brought in.
  57.  
  58. LDLIBS = ${LIBTKX.A} ${LIBTK.A} ${XLIBSW} ${LIBTCLX.A} ${LIBTCL.A} -lm ${LIBS}
  59.  
  60. CC_FLAGS = ${CPPFLAGS} ${XCFLAGS} ${CFLAGS} \
  61.            -I${srcbasedir}/src -I${bldbasedir}/src -I${srcbasedir}/tksrc \
  62.            -I${TK_UCB_SRC} -I${TCL_UCB_SRC} ${XINCLUDES}
  63.  
  64. .c.o:
  65.     ${CC} ${CC_FLAGS} -c $<
  66.  
  67. #------------------------------------------------------------------------------
  68.  
  69. OBJS=tkXinit.o   tkXmain.o  tkXshell.o  tkXdata.o
  70.  
  71. UCBOBJS=tkWindow.o
  72.  
  73. #------------------------------------------------------------------------------
  74. # Compile the TkX library and link wishx.  If the link fails, purge
  75. # the executable, as some systems leave invalid executables around.
  76.  
  77. all: made.tmp ${WISHX} ${APPINIT} ${SYSLIBS} ${TCL_PLUS_BUILD}
  78.  
  79. ${WISHX}: tkXAppInit.o ${LIBTKX.A} ${LIBTK.A} ${LIBTCLX.A} ${LIBTCL.A} made.tmp
  80.     ${CC} ${CC_FLAGS} ${XLDFLAGS} tkXAppInit.o ${LDLIBS} ${XLDLIBS} \
  81.         -o ${WISHX} || (rm -f ${WISHX}; exit 1)
  82.     if ${DO_STRIPPING} ; then \
  83.         strip ${WISHX}  ;\
  84.         ${MCS} ${WISHX} ;\
  85.     else \
  86.         exit 0 ;\
  87.     fi
  88.  
  89. made.tmp ${LIBTKX.A}: ${OBJS} ${UCBOBJS}
  90.     ${AR} cr ${LIBTKX.A} ${OBJS} ${UCBOBJS}
  91.     ${RANLIB} ${LIBTKX.A}
  92.     touch made.tmp
  93.  
  94. tkWindow.o: tkWindow.c
  95.     MASTER=${TK_MASTERDIR}/`../tools/tkxversion` ;\
  96.     ${CC} -c -I${TK_UCB_SRC} ${CC_FLAGS} ${DEFS} \
  97.         -DTK_LIBRARY=\"$$MASTER\" tkWindow.c
  98.  
  99. tkWindow.c: ${TK_UCB_SRC}/tkWindow.c
  100.     rm -f tkWindow.c
  101.     echo '#include "tclXconfig.h"' >tkWindow.c
  102.     cat ${TK_UCB_SRC}/tkWindow.c  >>tkWindow.c
  103.  
  104. tkXinit.o: tkXinit.c
  105.     MASTER=${TK_MASTERDIR}/`../tools/tkxversion` ;\
  106.     ${CC} -c ${CC_FLAGS} -DTK_MASTERDIR=\"$$MASTERDIR\" \
  107.             ${srcdir}/tkXinit.c
  108.  
  109. ${APPINIT}: tkXAppInit.c
  110.     rm -f ${APPINIT}
  111.     cp ${srcdir}/tkXAppInit.c ${APPINIT}
  112.  
  113. ${SYSLIBS}: SYSLIBS
  114.     rm -f ${SYSLIBS}
  115.     cp SYSLIBS ${SYSLIBS}
  116.  
  117. #------------------------------------------------------------------------------
  118. # Make sure tkXmain.c compiles and links with C++.
  119.  
  120. TCL_PLUS: wishx++ ${TKXMAINPP.O}
  121.  
  122. wishx++: tkXmain++.o made.tmp
  123.     ${CC} ${CC_FLAGS} ${XLDFLAGS} tkXAppInit.o ${LDLIBS} ${XLDLIBS} \
  124.         -o wishx++ || (rm -f wishx++; exit 1)
  125.  
  126. tkXmain++.o: tkXmain++.C
  127.     ${CCPLUS} -c -I${CPLUSINCL} ${CC_FLAGS} tkXmain++.C
  128.  
  129. tkXmain++.C: tkXmain.c
  130.     rm -f tkXmain++.C
  131.     cp ${srcdir}/tkXmain.c tkXmain++.C
  132.  
  133. ${TKXMAINPP.O}: tkXmain++.o
  134.     rm -f ${TKXMAINPP.O}
  135.     cp tkXmain++.o ${TKXMAINPP.O}
  136.  
  137. #------------------------------------------------------------------------------
  138. clean:
  139.     -rm -f made.tmp tkXmain++.C tkXAppInit.o tkWindow.c
  140.     -rm -f ${OBJS} ${UCBOBJS} tkXmain++.o ${WISHX} wishx++
  141.  
  142. #------------------------------------------------------------------------------
  143. # Restore to the distributed state.
  144.  
  145. distclean: clean
  146.     rm -f Makefile SYSLIBS
  147.